<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>js修改样式、更改属性</title>
</head>
<body>
    <img src="./1.jpg" width="200px">
    <script>
        // 1.获取图片元素
        const img=document.querySelector("img")
        console.log(img)
        // 2.修改图片对象属性 对象.属性名=属性值 
        img.src="./2.jpg"
        img.title="love you"
    </script>

</body>
</html>